<template>
  <!-- 滑动切换tab -->
  <van-tabs v-model="active" swipeable title-active-color='#ffd84d' animated='true' class="tabset">
    <van-tab v-for="category in categorys" :title="category" class="van-tab-back">
      <!-- <div style="height: 10px;">内容 {{ index }}</div> -->
      <goods-card :keycategory="category"></goods-card>
    </van-tab>
  </van-tabs>
</template>

<script>
  import Vue from 'vue';
  import { Tab, Tabs} from 'vant';
  import GoodsCard from 'home/components/Goodscard'
  Vue.use(Tab).use(Tabs);
  export default{
    name:'Tab',
    components:{
      GoodsCard
    },
    data() {
      return{
        categorys:['书籍','数码','互助','化妆品','代课']
      }
    }
  }
</script>

<style>
  .van-tab-back{
    background-color:ghostwhite ;
  }
  .tabset{
    /* padding-top: 0.5rem; */
  }
</style>
